import axios from '~/plugins/axios';
import { basicConfig } from '~/assets/js/config'

/**
 * 获取上传附件token
 *
 * @param commit
 * @param state
 * @param preload
 */
export const upToken = function ({commit, state}, preload) {
    return axios.post(basicConfig.baseUrl + '/feedback/upToken.do', preload || {})
    .catch(function (error) {
      
    });
};


/**
 * 生成验证码
 *
 * @param commit
 * @param state
 * @param preload
 */
export const createCode = function ({commit, state}, preload) {
    return axios.post(basicConfig.baseUrl + '/feedback/createCode.do', preload || {})
    .catch(function (error) {

    });
};

/**
 * 上传反馈
 *
 * @param commit
 * @param state
 * @param preload
 */
export const feedback = function ({commit, state}, preload) {
    return axios.post(basicConfig.baseUrl + '/feedback/feedback.do', preload || {})
        .catch(function (error) {

        });
};
